<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./../../template.xhtml">

            <ui:define name="title">CS - Visitante</ui:define>
            
            <ui:define name="mainMenu">
                <ui:include src="./../../mainMenu.xhtml" />
            </ui:define>
            
            
            <ui:define name="subtitle"><h:outputLabel value="Visitante > Cadastrar Visitante"/></ui:define>
            
            <ui:define name="leftMenu">
                <ui:include src="menuVisitante.xhtml" />
            </ui:define>
            
            <ui:define name="content">
                
                <center>
                    <h4><h:outputLabel value="Formulário Visitante"/></h4>
                </center>
                <p/>
                <h:form>
                    <center>
                    <h:panelGrid columns="1">
                        <h:panelGroup>
                            <h:outputLabel>Nome</h:outputLabel>
                            <h:inputText size="60" id="visitanteID" value="#{visitanteMB.visitante.nome}"></h:inputText>
                            <h:outputLabel>Telefone</h:outputLabel>
                            <h:inputText size="20" id="telefoneID" value="#{visitanteMB.visitante.telefone}"></h:inputText>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputLabel>Endereço</h:outputLabel>
                            <h:inputText size="35" id="enderecoID" value="#{visitanteMB.visitante.endereco}"></h:inputText>
                            <h:outputLabel>Bairro</h:outputLabel>
                            <h:inputText size="15" id="bairroID" value="#{visitanteMB.visitante.bairro}"></h:inputText>
                            <h:outputLabel>Cidade </h:outputLabel>
                            <h:inputText size="14" id="cidadeID" value="#{visitanteMB.visitante.cidade}"></h:inputText>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputLabel>CEP</h:outputLabel>
                            <h:inputText size="10" id="cepID" value="#{visitanteMB.visitante.cep}"></h:inputText>
                            <h:selectOneMenu id="ufID" value="#{visitanteMB.visitante.uf}">
                                <f:selectItem itemLabel="AC" itemValue="AC"/>
                                <f:selectItem itemLabel="AL" itemValue="AL"/>
                                <f:selectItem itemLabel="AP" itemValue="AP"/>
                                <f:selectItem itemLabel="AM" itemValue="AM"/>
                                <f:selectItem itemLabel="BA" itemValue="BA"/>
                                <f:selectItem itemLabel="CE" itemValue="CE"/>
                                <f:selectItem itemLabel="DF" itemValue="DF"/>
                                <f:selectItem itemLabel="ES" itemValue="ES"/>
                                <f:selectItem itemLabel="GO" itemValue="GO"/>
                                <f:selectItem itemLabel="MA" itemValue="MA"/>
                                <f:selectItem itemLabel="MT" itemValue="MT"/>
                                <f:selectItem itemLabel="MS" itemValue="MS"/>
                                <f:selectItem itemLabel="MG" itemValue="MG"/>
                                <f:selectItem itemLabel="PA" itemValue="PA"/>
                                <f:selectItem itemLabel="PB" itemValue="PB"/>
                                <f:selectItem itemLabel="PR" itemValue="PR"/>
                                <f:selectItem itemLabel="PE" itemValue="PE"/>
                                <f:selectItem itemLabel="PI" itemValue="PI"/>
                                <f:selectItem itemLabel="RJ" itemValue="RJ"/>
                                <f:selectItem itemLabel="RN" itemValue="RN"/>
                                <f:selectItem itemLabel="RS" itemValue="RS"/>
                                <f:selectItem itemLabel="RO" itemValue="RO"/>
                                <f:selectItem itemLabel="RR" itemValue="RR"/>
                                <f:selectItem itemLabel="SC" itemValue="SC"/>
                                <f:selectItem itemLabel="SP" itemValue="SP"/>
                                <f:selectItem itemLabel="SE" itemValue="SE"/>
                                <f:selectItem itemLabel="TO" itemValue="TO"/>
                                <f:selectItem itemLabel="UF" itemValue="UF"/>
                            </h:selectOneMenu>
                            <h:outputLabel>A que igreja Pertence?</h:outputLabel>
                            <h:inputText size="45" id="igrejaID" value="#{visitanteMB.visitante.igreja}"></h:inputText>
                        </h:panelGroup>
                    </h:panelGrid>
                    <h:panelGrid columns="2">
                        <h:selectBooleanCheckbox id="visitaID" value="#{visitanteMB.visitante.visita}"></h:selectBooleanCheckbox>
                        <h:outputLabel>Deseja receber visita pastoral?</h:outputLabel>
                        <h:selectBooleanCheckbox id="infIgrejaID" value="#{visitanteMB.visitante.infIgreja}"></h:selectBooleanCheckbox>
                        <h:outputLabel>Deseja reber Informações sobre a igreja</h:outputLabel>
                        <h:selectBooleanCheckbox id="infMembroID" value="#{visitanteMB.visitante.infMembro}"></h:selectBooleanCheckbox>
                        <h:outputLabel>Deseja receber Informações de como se arrolar como membro</h:outputLabel>
                    </h:panelGrid>
                    <h:commandButton value="Limpar" action="formVisitante"></h:commandButton>
                    <h:commandButton value="Salvar" id="btSalvar" action="#{visitanteMB.salvar}"></h:commandButton>
                    </center>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
